Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

APP(app(app(app(filter2, false), fun), x), xs) → APP(filter, fun)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(app(filter2, app(fun, x)), fun)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(fun, x)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(app(app(filter2, app(fun, x)), fun), x)
APP(h, app(app(cons, x), y)) → APP(h, app(g, app(app(cons, x), y)))
APP(g, app(app(cons, 0), y)) → APP(g, y)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(app(app(app(filter2, app(fun, x)), fun), x), xs)
APP(h, app(app(cons, x), y)) → APP(g, app(app(cons, x), y))
APP(app(map, fun), app(app(cons, x), xs)) → APP(fun, x)
APP(app(map, fun), app(app(cons, x), xs)) → APP(app(map, fun), xs)
APP(app(app(app(filter2, true), fun), x), xs) → APP(cons, x)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(filter2, app(fun, x))
APP(app(app(app(filter2, false), fun), x), xs) → APP(app(filter, fun), xs)
APP(app(app(app(filter2, true), fun), x), xs) → APP(app(filter, fun), xs)
APP(app(map, fun), app(app(cons, x), xs)) → APP(cons, app(fun, x))
APP(app(app(app(filter2, true), fun), x), xs) → APP(filter, fun)
APP(f, app(s, x)) → APP(f, x)
APP(app(app(app(filter2, true), fun), x), xs) → APP(app(cons, x), app(app(filter, fun), xs))
APP(app(map, fun), app(app(cons, x), xs)) → APP(app(cons, app(fun, x)), app(app(map, fun), xs))

The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(app(app(filter2, false), fun), x), xs) → APP(filter, fun)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(app(filter2, app(fun, x)), fun)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(fun, x)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(app(app(filter2, app(fun, x)), fun), x)
APP(h, app(app(cons, x), y)) → APP(h, app(g, app(app(cons, x), y)))
APP(g, app(app(cons, 0), y)) → APP(g, y)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(app(app(app(filter2, app(fun, x)), fun), x), xs)
APP(h, app(app(cons, x), y)) → APP(g, app(app(cons, x), y))
APP(app(map, fun), app(app(cons, x), xs)) → APP(fun, x)
APP(app(map, fun), app(app(cons, x), xs)) → APP(app(map, fun), xs)
APP(app(app(app(filter2, true), fun), x), xs) → APP(cons, x)
APP(app(filter, fun), app(app(cons, x), xs)) → APP(filter2, app(fun, x))
APP(app(app(app(filter2, false), fun), x), xs) → APP(app(filter, fun), xs)
APP(app(app(app(filter2, true), fun), x), xs) → APP(app(filter, fun), xs)
APP(app(map, fun), app(app(cons, x), xs)) → APP(cons, app(fun, x))
APP(app(app(app(filter2, true), fun), x), xs) → APP(filter, fun)
APP(f, app(s, x)) → APP(f, x)
APP(app(app(app(filter2, true), fun), x), xs) → APP(app(cons, x), app(app(filter, fun), xs))
APP(app(map, fun), app(app(cons, x), xs)) → APP(app(cons, app(fun, x)), app(app(map, fun), xs))

The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 4 SCCs with 11 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(g, app(app(cons, 0), y)) → APP(g, y)

The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(g, app(app(cons, 0), y)) → APP(g, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = (2)x_2   
POL(cons) = 1   
POL(g) = 0   
POL(app(x1, x2)) = x_1 + x_2   
POL(0) = 0   
The value of delta used in the strict ordering is 2.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(h, app(app(cons, x), y)) → APP(h, app(g, app(app(cons, x), y)))

The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(h, app(app(cons, x), y)) → APP(h, app(g, app(app(cons, x), y)))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = (4)x_2   
POL(cons) = 4   
POL(g) = 3/2   
POL(app(x1, x2)) = 3/2 + (4)x_1   
POL(h) = 0   
POL(s) = 3/4   
POL(0) = 0   
The value of delta used in the strict ordering is 256.
The following usable rules [17] were oriented:

app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(f, app(s, x)) → APP(f, x)

The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(f, app(s, x)) → APP(f, x)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = (2)x_2   
POL(f) = 0   
POL(app(x1, x2)) = 1 + (4)x_2   
POL(s) = 3   
The value of delta used in the strict ordering is 2.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(filter, fun), app(app(cons, x), xs)) → APP(fun, x)
APP(app(app(app(filter2, false), fun), x), xs) → APP(app(filter, fun), xs)
APP(app(app(app(filter2, true), fun), x), xs) → APP(app(filter, fun), xs)
APP(app(map, fun), app(app(cons, x), xs)) → APP(fun, x)
APP(app(map, fun), app(app(cons, x), xs)) → APP(app(map, fun), xs)

The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(app(filter, fun), app(app(cons, x), xs)) → APP(fun, x)
APP(app(app(app(filter2, false), fun), x), xs) → APP(app(filter, fun), xs)
APP(app(app(app(filter2, true), fun), x), xs) → APP(app(filter, fun), xs)
APP(app(map, fun), app(app(cons, x), xs)) → APP(fun, x)
APP(app(map, fun), app(app(cons, x), xs)) → APP(app(map, fun), xs)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = (4)x_1 + (4)x_2   
POL(cons) = 4   
POL(true) = 4   
POL(map) = 1   
POL(false) = 4   
POL(app(x1, x2)) = 4 + (4)x_1 + (4)x_2   
POL(filter2) = 3   
POL(filter) = 4   
The value of delta used in the strict ordering is 336.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(f, app(s, x)) → app(f, x)
app(g, app(app(cons, 0), y)) → app(g, y)
app(g, app(app(cons, app(s, x)), y)) → app(s, x)
app(h, app(app(cons, x), y)) → app(h, app(g, app(app(cons, x), y)))
app(app(map, fun), nil) → nil
app(app(map, fun), app(app(cons, x), xs)) → app(app(cons, app(fun, x)), app(app(map, fun), xs))
app(app(filter, fun), nil) → nil
app(app(filter, fun), app(app(cons, x), xs)) → app(app(app(app(filter2, app(fun, x)), fun), x), xs)
app(app(app(app(filter2, true), fun), x), xs) → app(app(cons, x), app(app(filter, fun), xs))
app(app(app(app(filter2, false), fun), x), xs) → app(app(filter, fun), xs)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.